Optimal. Leaf size=83 \[ \frac{\log (d+e x) \left (a e^2-b d e+c d^2\right )}{e^2 (e f-d g)}-\frac{\log (f+g x) \left (a g^2-b f g+c f^2\right )}{g^2 (e f-d g)}+\frac{c x}{e g} \]
[Out]
_______________________________________________________________________________________
Rubi [A] time = 0.204558, antiderivative size = 83, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 1, integrand size = 25, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.04 \[ \frac{\log (d+e x) \left (a e^2-b d e+c d^2\right )}{e^2 (e f-d g)}-\frac{\log (f+g x) \left (a g^2-b f g+c f^2\right )}{g^2 (e f-d g)}+\frac{c x}{e g} \]
Antiderivative was successfully verified.
[In] Int[(a + b*x + c*x^2)/((d + e*x)*(f + g*x)),x]
[Out]
_______________________________________________________________________________________
Rubi in Sympy [F] time = 0., size = 0, normalized size = 0. \[ \frac{\left (a g^{2} - b f g + c f^{2}\right ) \log{\left (f + g x \right )}}{g^{2} \left (d g - e f\right )} + \frac{\int c\, dx}{e g} - \frac{\left (a e^{2} - b d e + c d^{2}\right ) \log{\left (d + e x \right )}}{e^{2} \left (d g - e f\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] rubi_integrate((c*x**2+b*x+a)/(e*x+d)/(g*x+f),x)
[Out]
_______________________________________________________________________________________
Mathematica [A] time = 0.0956298, size = 85, normalized size = 1.02 \[ -\frac{\log (d+e x) \left (-a e^2+b d e-c d^2\right )}{e^2 (e f-d g)}-\frac{\log (f+g x) \left (a g^2-b f g+c f^2\right )}{g^2 (e f-d g)}+\frac{c x}{e g} \]
Antiderivative was successfully verified.
[In] Integrate[(a + b*x + c*x^2)/((d + e*x)*(f + g*x)),x]
[Out]
_______________________________________________________________________________________
Maple [A] time = 0.011, size = 142, normalized size = 1.7 \[{\frac{cx}{eg}}+{\frac{\ln \left ( gx+f \right ) a}{dg-ef}}-{\frac{\ln \left ( gx+f \right ) bf}{ \left ( dg-ef \right ) g}}+{\frac{\ln \left ( gx+f \right ) c{f}^{2}}{{g}^{2} \left ( dg-ef \right ) }}-{\frac{\ln \left ( ex+d \right ) a}{dg-ef}}+{\frac{\ln \left ( ex+d \right ) bd}{ \left ( dg-ef \right ) e}}-{\frac{\ln \left ( ex+d \right ) c{d}^{2}}{ \left ( dg-ef \right ){e}^{2}}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] int((c*x^2+b*x+a)/(e*x+d)/(g*x+f),x)
[Out]
_______________________________________________________________________________________
Maxima [A] time = 0.692818, size = 117, normalized size = 1.41 \[ \frac{{\left (c d^{2} - b d e + a e^{2}\right )} \log \left (e x + d\right )}{e^{3} f - d e^{2} g} - \frac{{\left (c f^{2} - b f g + a g^{2}\right )} \log \left (g x + f\right )}{e f g^{2} - d g^{3}} + \frac{c x}{e g} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate((c*x^2 + b*x + a)/((e*x + d)*(g*x + f)),x, algorithm="maxima")
[Out]
_______________________________________________________________________________________
Fricas [A] time = 0.295032, size = 134, normalized size = 1.61 \[ \frac{{\left (c d^{2} - b d e + a e^{2}\right )} g^{2} \log \left (e x + d\right ) +{\left (c e^{2} f g - c d e g^{2}\right )} x -{\left (c e^{2} f^{2} - b e^{2} f g + a e^{2} g^{2}\right )} \log \left (g x + f\right )}{e^{3} f g^{2} - d e^{2} g^{3}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate((c*x^2 + b*x + a)/((e*x + d)*(g*x + f)),x, algorithm="fricas")
[Out]
_______________________________________________________________________________________
Sympy [A] time = 15.4255, size = 420, normalized size = 5.06 \[ \frac{c x}{e g} + \frac{\left (a g^{2} - b f g + c f^{2}\right ) \log{\left (x + \frac{a d e g^{2} + a e^{2} f g - 2 b d e f g + c d^{2} f g + c d e f^{2} - \frac{d^{2} e g \left (a g^{2} - b f g + c f^{2}\right )}{d g - e f} + \frac{2 d e^{2} f \left (a g^{2} - b f g + c f^{2}\right )}{d g - e f} - \frac{e^{3} f^{2} \left (a g^{2} - b f g + c f^{2}\right )}{g \left (d g - e f\right )}}{2 a e^{2} g^{2} - b d e g^{2} - b e^{2} f g + c d^{2} g^{2} + c e^{2} f^{2}} \right )}}{g^{2} \left (d g - e f\right )} - \frac{\left (a e^{2} - b d e + c d^{2}\right ) \log{\left (x + \frac{a d e g^{2} + a e^{2} f g - 2 b d e f g + c d^{2} f g + c d e f^{2} + \frac{d^{2} g^{3} \left (a e^{2} - b d e + c d^{2}\right )}{e \left (d g - e f\right )} - \frac{2 d f g^{2} \left (a e^{2} - b d e + c d^{2}\right )}{d g - e f} + \frac{e f^{2} g \left (a e^{2} - b d e + c d^{2}\right )}{d g - e f}}{2 a e^{2} g^{2} - b d e g^{2} - b e^{2} f g + c d^{2} g^{2} + c e^{2} f^{2}} \right )}}{e^{2} \left (d g - e f\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate((c*x**2+b*x+a)/(e*x+d)/(g*x+f),x)
[Out]
_______________________________________________________________________________________
GIAC/XCAS [F(-2)] time = 0., size = 0, normalized size = 0. \[ \text{Exception raised: NotImplementedError} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate((c*x^2 + b*x + a)/((e*x + d)*(g*x + f)),x, algorithm="giac")
[Out]